using System;
using UnityEngine;

public class DownSceneRoomTrigger : TriggerBase
{
    [SerializeField] private Transform teleportTraget;
    protected override void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player") == false)
            return;

        EventCenter.TriggerEvent<float, Action>(EventName.PlayerSlectFail, 0, () =>
        {
            Player.Instance.transform.position = teleportTraget.position;
        });
    }
}
